package com.jiajia.study.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 聊天信息存储表
 * </p>
 *
 * @author zjj
 * @since 2024-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("chat_message")
@ApiModel(value="ChatMessage对象", description="聊天信息存储表")
public class ChatMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @ApiModelProperty(value = "发送者的用户id")
    private String senderId;

    @ApiModelProperty(value = "接受者的用户id")
    private String receiverId;

    @ApiModelProperty(value = "消息接受者的类型，是HR还是求职者，目的为了让前端不同页面接受判断并且处理显示")
    private Integer receiverType;

    @ApiModelProperty(value = "聊天内容")
    private String msg;

    @ApiModelProperty(value = "消息类型，有文字类、图片类、视频类...等，详见枚举类")
    private Integer msgType;

    @ApiModelProperty(value = "消息的聊天时间，既是发送者的发送时间、又是接受者的接受时间")
    private LocalDateTime chatTime;

    @ApiModelProperty(value = "标记存储数据库，用于历史展示。每超过1分钟，则显示聊天时间，前端可以控制时间长短")
    private Integer showMsgDateTimeFlag;

    @ApiModelProperty(value = "视频地址")
    private String videoPath;

    @ApiModelProperty(value = "视频宽度")
    private Integer videoWidth;

    @ApiModelProperty(value = "视频高度")
    private Integer videoHeight;

    @ApiModelProperty(value = "视频时间")
    private Integer videoTimes;

    @ApiModelProperty(value = "语音地址")
    private String voicePath;

    @ApiModelProperty(value = "语音时长")
    private Integer speakVoiceDuration;

    @ApiModelProperty(value = "语音消息标记是否已读未读，true: 已读，false: 未读")
    private Boolean isRead;

    @ApiModelProperty(value = "候选人用户id")
    private String resumeUserId;

    @ApiModelProperty(value = "简历名称（候选人名称） 简历名称与职位使用字段冗余，目的相当于快照，只记录当时信息")
    private String resumeName;

    @ApiModelProperty(value = "候选人职位 简历名称与职位使用字段冗余，目的相当于快照，只记录当时信息")
    private String resumePosition;


}
